const Mock = require('mockjs')

const typeArr = ['消息通知','系统维护']
const roleArr = ['超级管理员','校级领导','督导组长']

module.exports = function (req) {
  const result = Mock.mock({
    "list|1-20": [{
      id: "@id()", // 随机id
      name: "@cname()", // 随机名字
      date: "@date()", // 随机日期
      cparagraph: "@cparagraph()", // 随机描述
      "score|1-100":100,
      'type|1': typeArr,
      'role|1':roleArr,
      "status|1-2":1,
      'statusName':'已发布',
    }],
    "pageNo|+1":1,
    pageSize:10,
    total:20
})
  return {
    "result": result,
    "error": null,
    "success": true,
    "code": "10000",
    "datetime": Date.now(),
  }
};
